<ol class="breadcrumb">
    <li class="breadcrumb-item">{{t "coverage-page-title" }}</li>
</ol>

<div>
    <img src="./images/coverage-badge-documentation.svg">
</div>

<table class="table table-bordered coverage" id="coverage-table">
    <thead class="coverage-header">
        <tr>
            <th>{{t "file" }}</th>
            <th>{{t "type" }}</th>
            <th>{{t "identifier" }}</th>
            <th style="text-align:right" class="statements" data-sort-default>{{t "statements" }}</th>
        </tr>
    </thead>
    <tbody>
        {{#each files}}
        <tr class="{{status}}">
            <td>
                <!-- miscellaneous -->
                {{#if linksubtype}}
                    {{#ifEqualString type 'type alias'}}
                        <a href="./{{linktype}}/{{linksubtype}}es.html#{{name}}">{{filePath}}</a>
                    {{else}}
                        <a href="./{{linktype}}/{{linksubtype}}s.html#{{name}}">{{filePath}}</a>
                    {{/ifEqualString}}
                {{else}}
                    {{#ifEqualString linktype 'entity'}}
                        <a href="./entities/{{name}}.html">{{filePath}}</a>
                    {{else}}
                        <a href="./{{linktype}}s/{{name}}.html">{{filePath}}</a>
                    {{/ifEqualString}}
                {{/if}}
            </td>
            <td>{{type}}</td>
            <td>{{name}}</td>
            <td align="right" data-sort="{{coveragePercent}}">
                <span class="coverage-percent">{{coveragePercent}} %</span>
                <span class="coverage-count">({{coverageCount}})</span>
            </td>
        </tr>
        {{/each}}
    </tbody>
</table>

<script src="{{relativeURL data.depth }}js/libs/tablesort.min.js"></script>
<script src="{{relativeURL data.depth }}js/libs/tablesort.number.min.js"></script>
<script>
    new Tablesort(document.getElementById('coverage-table'));
</script>